public class UseBusException {
    private int peopleNum;
    public UseBusException(){}
    public UseBusException(int peopleNum){
       this.peopleNum = peopleNum;
    }

    public void throwException() throws BusException{
        if (peopleNum > 50){
            throw new BusException("人数超载请下车"+(peopleNum - 50)+"人");

        }
    }

}
